<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Alexa Auto SDK: com.amazon.aace.alexa.ExternalMediaAdapter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="aace-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Alexa Auto SDK
   &#160;<span id="projectnumber">2.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>com</b></li><li class="navelem"><b>amazon</b></li><li class="navelem"><b>aace</b></li><li class="navelem"><b>alexa</b></li><li class="navelem"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html">ExternalMediaAdapter</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">com.amazon.aace.alexa.ExternalMediaAdapter Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_favorites.html">Favorites</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_media_type.html">MediaType</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_navigation.html">Navigation</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_play_control_type.html">PlayControlType</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_supported_playback_operation.html">SupportedPlaybackOperation</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6aa1476a6900c5380884944191f71136"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a6aa1476a6900c5380884944191f71136">login</a> (String localPlayerId, String accessToken, String userName, boolean forceLogin, long tokenRefreshInterval)</td></tr>
<tr class="separator:a6aa1476a6900c5380884944191f71136"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dfc0565e9ac5c0662a9431886f8ef6e"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a8dfc0565e9ac5c0662a9431886f8ef6e">logout</a> (String localPlayerId)</td></tr>
<tr class="separator:a8dfc0565e9ac5c0662a9431886f8ef6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e6f48d186f9e329cc23e7e27af1fe22"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a4e6f48d186f9e329cc23e7e27af1fe22">play</a> (String localPlayerId, String playContextToken, long index, long offset, boolean preload, <a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_navigation.html">Navigation</a> navigation)</td></tr>
<tr class="separator:a4e6f48d186f9e329cc23e7e27af1fe22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc4aeb97fa65762599c5d49ad5ff55fc"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#acc4aeb97fa65762599c5d49ad5ff55fc">playControl</a> (String localPlayerId, <a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_play_control_type.html">PlayControlType</a> playControlType)</td></tr>
<tr class="separator:acc4aeb97fa65762599c5d49ad5ff55fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c511f6d0967158f9512d5359e4a4a10"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a6c511f6d0967158f9512d5359e4a4a10">seek</a> (String localPlayerId, long offset)</td></tr>
<tr class="separator:a6c511f6d0967158f9512d5359e4a4a10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2bef490d146d40b7dcf7cf76f011fbb"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#ae2bef490d146d40b7dcf7cf76f011fbb">adjustSeek</a> (String localPlayerId, long deltaOffset)</td></tr>
<tr class="separator:ae2bef490d146d40b7dcf7cf76f011fbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ddaaef81a0c9edbdffc2f4149f638e8"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a0ddaaef81a0c9edbdffc2f4149f638e8">authorize</a> (AuthorizedPlayerInfo[] authorizedPlayers)</td></tr>
<tr class="separator:a0ddaaef81a0c9edbdffc2f4149f638e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c32897522b03df84e84a04e2c15296b"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a2c32897522b03df84e84a04e2c15296b">getState</a> (String localPlayerId, ExternalMediaAdapterState state)</td></tr>
<tr class="separator:a2c32897522b03df84e84a04e2c15296b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9b7aaa10e0d43695714364a616c86c4"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#aa9b7aaa10e0d43695714364a616c86c4">volumeChanged</a> (float volume)</td></tr>
<tr class="separator:aa9b7aaa10e0d43695714364a616c86c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe18a6f17fa731a2abb0812d9d3b7c34"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#afe18a6f17fa731a2abb0812d9d3b7c34">mutedStateChanged</a> (<a class="el" href="enumcom_1_1amazon_1_1aace_1_1audio_1_1_audio_output_1_1_muted_state.html">MutedState</a> state)</td></tr>
<tr class="separator:afe18a6f17fa731a2abb0812d9d3b7c34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac35c5760ab1c2cfca05f59eb0fdfa62b"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#ac35c5760ab1c2cfca05f59eb0fdfa62b">reportDiscoveredPlayers</a> (DiscoveredPlayerInfo[] discoveredPlayers)</td></tr>
<tr class="separator:ac35c5760ab1c2cfca05f59eb0fdfa62b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70408cbfd6cf421643434928d4619511"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a70408cbfd6cf421643434928d4619511">requestToken</a> (String localPlayerId)</td></tr>
<tr class="separator:a70408cbfd6cf421643434928d4619511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3423902d7b22164145d24e74a171765e"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a3423902d7b22164145d24e74a171765e">loginComplete</a> (String localPlayerId)</td></tr>
<tr class="separator:a3423902d7b22164145d24e74a171765e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d6279826669b48ebf5c670985f0f092"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a9d6279826669b48ebf5c670985f0f092">logoutComplete</a> (String localPlayerId)</td></tr>
<tr class="separator:a9d6279826669b48ebf5c670985f0f092"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07f3cca30000f1e28036aef2a312d867"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a07f3cca30000f1e28036aef2a312d867">playerEvent</a> (String localPlayerId, String eventName)</td></tr>
<tr class="separator:a07f3cca30000f1e28036aef2a312d867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ff1f7608f65642db3b77c5f9645a3f0"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a1ff1f7608f65642db3b77c5f9645a3f0">playerError</a> (String localPlayerId, String errorName, long code, String description, boolean fatal)</td></tr>
<tr class="separator:a1ff1f7608f65642db3b77c5f9645a3f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcf544d90c89515cd2de3af216ee53cf"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#adcf544d90c89515cd2de3af216ee53cf">setFocus</a> (String localPlayerId)</td></tr>
<tr class="separator:adcf544d90c89515cd2de3af216ee53cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae34e390c93b76497b86db5cdcd16fda6"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#ae34e390c93b76497b86db5cdcd16fda6">removeDiscoveredPlayer</a> (String localPlayerId)</td></tr>
<tr class="separator:ae34e390c93b76497b86db5cdcd16fda6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html">ExternalMediaAdapter</a> should be extended to handle external media player application interaction with AVS. The platform implementation is responsible for managing the client, and media session state control. The <code><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html">ExternalMediaAdapter</a></code> will also receive directives from the Engine to handle audio playback/control.</p>
<dl class="section see"><dt>See also</dt><dd>Speaker </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a6aa1476a6900c5380884944191f71136"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6aa1476a6900c5380884944191f71136">&#9670;&nbsp;</a></span>login()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.login </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>accessToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>userName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>forceLogin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>tokenRefreshInterval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Directive called after a discovered player initiates the loginComplete event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">accessToken</td><td>The handshake token between AVS, and the external media player app session</td></tr>
    <tr><td class="paramname">userName</td><td>The username proided by the external media player app, if available</td></tr>
    <tr><td class="paramname">forceLogin</td><td>True if no handshake is needed, and login is simply assumed</td></tr>
    <tr><td class="paramname">tokenRefreshInterval</td><td>refresh interval of the accessToken, if available</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="a8dfc0565e9ac5c0662a9431886f8ef6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dfc0565e9ac5c0662a9431886f8ef6e">&#9670;&nbsp;</a></span>logout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.logout </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Directive called after a discovered player initiates the logoutComplete event.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="a4e6f48d186f9e329cc23e7e27af1fe22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e6f48d186f9e329cc23e7e27af1fe22">&#9670;&nbsp;</a></span>play()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.play </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>playContextToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>preload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_navigation.html">Navigation</a>&#160;</td>
          <td class="paramname"><em>navigation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called when the user first calls play for the external media via voice control.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">playContextToken</td><td>Track/playlist/album/artist/station/podcast context identifier</td></tr>
    <tr><td class="paramname">index</td><td>If the playback context is an indexable container like a playlist, the index of the media item in the container</td></tr>
    <tr><td class="paramname">offset</td><td>Offset position within media item, in milliseconds</td></tr>
    <tr><td class="paramname">preload</td><td>Whether the media item should preload or not</td></tr>
    <tr><td class="paramname">navigation</td><td>The app transition behavior</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="acc4aeb97fa65762599c5d49ad5ff55fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc4aeb97fa65762599c5d49ad5ff55fc">&#9670;&nbsp;</a></span>playControl()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.playControl </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter_1_1_play_control_type.html">PlayControlType</a>&#160;</td>
          <td class="paramname"><em>playControlType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Occurs during playback control via voice interaction or <a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_playback_controller.html">PlaybackController</a> interface</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">playControlType</td><td>Playback control type being invoked</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_playback_controller.html">PlaybackController</a></dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="a6c511f6d0967158f9512d5359e4a4a10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c511f6d0967158f9512d5359e4a4a10">&#9670;&nbsp;</a></span>seek()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.seek </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called when the user invokes media seek via speech.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">offset</td><td>Offset position within media item, in milliseconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="ae2bef490d146d40b7dcf7cf76f011fbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2bef490d146d40b7dcf7cf76f011fbb">&#9670;&nbsp;</a></span>adjustSeek()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.adjustSeek </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>deltaOffset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called when the user invokes media seek adjustment via speech.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">deltaOffset</td><td>Change in offset position within media item, in milliseconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="a0ddaaef81a0c9edbdffc2f4149f638e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ddaaef81a0c9edbdffc2f4149f638e8">&#9670;&nbsp;</a></span>authorize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.authorize </td>
          <td>(</td>
          <td class="paramtype">AuthorizedPlayerInfo []&#160;</td>
          <td class="paramname"><em>authorizedPlayers</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Called after discovered media players have been reported. Returns a list of reported players and whether they have been authorized for use with Alexa.</p>
<dl class="section note"><dt>Note</dt><dd>It is not guaranteed that every player reported in a call to <code><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#ac35c5760ab1c2cfca05f59eb0fdfa62b">reportDiscoveredPlayers()</a></code> will be included in the next call to <code><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a0ddaaef81a0c9edbdffc2f4149f638e8">authorize()</a></code>. If a player is excluded from a call to <code><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a0ddaaef81a0c9edbdffc2f4149f638e8">authorize()</a></code> after it is included in the preceding <code><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#ac35c5760ab1c2cfca05f59eb0fdfa62b">reportDiscoveredPlayers()</a></code>, this does not necessarily imply it was deauthorized by Alexa. It is possible that a player may be included in more than one call to <code><a class="el" href="classcom_1_1amazon_1_1aace_1_1alexa_1_1_external_media_adapter.html#a0ddaaef81a0c9edbdffc2f4149f638e8">authorize()</a></code>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">authorizedPlayers</td><td>A list of discovered players with their status of authorization for use with Alexa</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="a2c32897522b03df84e84a04e2c15296b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c32897522b03df84e84a04e2c15296b">&#9670;&nbsp;</a></span>getState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.getState </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ExternalMediaAdapterState&#160;</td>
          <td class="paramname"><em>state</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Must provide the local external media player apps , and  information to maintain cloud sync</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app </td></tr>
    <tr><td class="paramname">state</td><td>The <code>ExternalMediaAdapterState</code> to be initialized by the platform</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform is able to provide state information for the external media player, else <code>false</code> </dd></dl>

</div>
</div>
<a id="aa9b7aaa10e0d43695714364a616c86c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9b7aaa10e0d43695714364a616c86c4">&#9670;&nbsp;</a></span>volumeChanged()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.volumeChanged </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>volume</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notifies the platform implementation to set the volume of the output channel. The <code>volume</code> value should be scaled to fit the needs of the platform.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>The volume to set on the output channel. <code>volume</code> is in the range [0,1]. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="afe18a6f17fa731a2abb0812d9d3b7c34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe18a6f17fa731a2abb0812d9d3b7c34">&#9670;&nbsp;</a></span>mutedStateChanged()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean com.amazon.aace.alexa.ExternalMediaAdapter.mutedStateChanged </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="enumcom_1_1amazon_1_1aace_1_1audio_1_1_audio_output_1_1_muted_state.html">MutedState</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notifies the platform implementation to apply a mute state change to the output channel</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>The muted state to apply to the output channel. <code>MutedState::MUTED</code> when the output channel be muted, <code>MutedState::UNMUTED</code> when unmuted </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the platform implementation successfully handled the call, else <code>false</code> </dd></dl>

</div>
</div>
<a id="ac35c5760ab1c2cfca05f59eb0fdfa62b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac35c5760ab1c2cfca05f59eb0fdfa62b">&#9670;&nbsp;</a></span>reportDiscoveredPlayers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.reportDiscoveredPlayers </td>
          <td>(</td>
          <td class="paramtype">DiscoveredPlayerInfo []&#160;</td>
          <td class="paramname"><em>discoveredPlayers</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on startup in order to notify AVS of the local external media players</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">discoveredPlayers</td><td>contains the discovered player info objects </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a70408cbfd6cf421643434928d4619511"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70408cbfd6cf421643434928d4619511">&#9670;&nbsp;</a></span>requestToken()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.requestToken </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The device is responsible for requesting an access token when needed. This is typically done immediately upon connection to AVS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3423902d7b22164145d24e74a171765e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3423902d7b22164145d24e74a171765e">&#9670;&nbsp;</a></span>loginComplete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.loginComplete </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on a local external media player login. This will set authorization of the app with AVS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9d6279826669b48ebf5c670985f0f092"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d6279826669b48ebf5c670985f0f092">&#9670;&nbsp;</a></span>logoutComplete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.logoutComplete </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on a local external media player logout. This will unset authorization of the app with AVS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a07f3cca30000f1e28036aef2a312d867"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07f3cca30000f1e28036aef2a312d867">&#9670;&nbsp;</a></span>playerEvent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.playerEvent </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>eventName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on a local external media player event. This will sync the context with AVS.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">eventName</td><td>Canonical event name </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1ff1f7608f65642db3b77c5f9645a3f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ff1f7608f65642db3b77c5f9645a3f0">&#9670;&nbsp;</a></span>playerError()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.playerError </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>errorName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>fatal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on a player error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app</td></tr>
    <tr><td class="paramname">errorName</td><td>The name of the error</td></tr>
    <tr><td class="paramname">code</td><td>The error code</td></tr>
    <tr><td class="paramname">description</td><td>The detailed error description</td></tr>
    <tr><td class="paramname">fatal</td><td>true if the error is fatal </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adcf544d90c89515cd2de3af216ee53cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcf544d90c89515cd2de3af216ee53cf">&#9670;&nbsp;</a></span>setFocus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.setFocus </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on local external media player events. This will switch the media focus to that context.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae34e390c93b76497b86db5cdcd16fda6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae34e390c93b76497b86db5cdcd16fda6">&#9670;&nbsp;</a></span>removeDiscoveredPlayer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final void com.amazon.aace.alexa.ExternalMediaAdapter.removeDiscoveredPlayer </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>localPlayerId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Should be called on when a registered media player has been uninstalled or is no longer available.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localPlayerId</td><td>The opaque token that uniquely identifies the local external player app </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<html>
  <body>
    <hr style="height:1px;border-width:0;color:gray;background-color:gray">
    <p style="text-align:left;">
      Alexa Auto SDK 2.2.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
      <span style="float:right;">
        Licensed under the <a HREF=http://aws.amazon.com/apache2.0/>Apache License, Version 2.0</a>
      </span>
    </p>
  </body>
</html>
